<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- BOOTSTRAP STYLES-->
<link href="css/bootstrap.css" rel="stylesheet" />
<!-- FONTAWESOME STYLES-->
<link href="css/font-awesome.css" rel="stylesheet" />
<!--CUSTOM BASIC STYLES-->
<link href="css/basic.css" rel="stylesheet" />
<!--CUSTOM MAIN STYLES-->
<link href="assets/css/custom.css" rel="stylesheet" />
<!-- GOOGLE FONTS-->
<link href='http://fonts.useso.com/css?family=Open+Sans'
	rel='stylesheet' type='text/css' />
<script src="http://code.jquery.com/jquery-1.11.0-beta1.js"></script>
<title></title>
<script type="text/javascript">
			function dianji() {

				var flag = document.getElementById("all").checked;
	     		var cks = document.getElementsByName("ck");

				if(flag) {

					for(var i = 0; i < cks.length; i++) {

						cks[i].checked = true;

					}

				} else {

					for(var i = 0; i < cks.length; i++) {

						cks[i].checked = false;

					}

				}

			}
		</script>
</head>
<body>
<script type="text/javascript">
function editDNum(OMid,Oid) {
	var numtext = $("#qty-"+OMid).val();
	window.location.href="editOmDn.do?OMid="+OMid+"&Mnumber="+numtext+"&Oid="+Oid;
}
</script>
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<h1 class="page-header">订单详情</h1>
			</div>
		</div>
		<div>
		<form action="upOs.do">
		订单状态：<select id="OSid" name="OSid">
									<c:forEach items="${orderState }" var="orderState">
										<option value="${orderState.OSid }" <c:if test="${orderState.OSid==order.OSid}">selected='selected'</c:if>>${orderState.OSname }</option>
									</c:forEach>
		</select>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
		<input type="submit" value="保存" />
		</form>
		</div>
		<br/>
		<div class="row">
			<div class=" col-md-12 ">
				<!-- 商品列表--bootstrap高级表格使用 -->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-striped table-bordered table-hover"
								id="order_manage">
								<thead>
									<tr>
									    <th>编号</th>
										<th>订单编号</th>
										<th>菜品名称</th>
										<th>菜品单价</th>
										<th>菜品数量</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${orderMessage}" var="orderMessage">
										<tr>
											<td name='oMid'>${orderMessage.OMid}</td>
											<td name='Oid'>${orderMessage.oid}</td>
											<td name='DishName'>${orderMessage.dishName}</td>
											<td name='dishPrice'>${orderMessage.dishPrice}</td>
											<td name='mnumber'><input id="qty-${orderMessage.OMid}"
												type="number" min="1" max="10"
												value="${orderMessage.mnumber}" size="4"
												class="input-text qty text"
												onclick="editDNum(${orderMessage.OMid},${orderMessage.oid})"></td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

</body>
</html>